home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / AppleGuide.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  9.4 KB  |  419 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        AppleGuide.a
  3. ;
  4. ;    Contains:    Apple Guide Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__APPLEGUIDE__') = 'UNDEFINED' THEN
  21. __APPLEGUIDE__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  25.     include 'AppleEvents.a'
  26.     ENDIF
  27. ;        include 'Errors.a'                                            ;
  28. ;            include 'ConditionalMacros.a'                            ;
  29. ;        include 'Types.a'                                            ;
  30. ;        include 'Memory.a'                                            ;
  31. ;            include 'MixedMode.a'                                    ;
  32. ;        include 'OSUtils.a'                                        ;
  33. ;        include 'Events.a'                                            ;
  34. ;            include 'Quickdraw.a'                                    ;
  35. ;                include 'QuickdrawText.a'                            ;
  36. ;        include 'EPPC.a'                                            ;
  37. ;            include 'AppleTalk.a'                                    ;
  38. ;            include 'Files.a'                                        ;
  39. ;                include 'Finder.a'                                    ;
  40. ;            include 'PPCToolbox.a'                                    ;
  41. ;            include 'Processes.a'                                    ;
  42. ;        include 'Notification.a'                                    ;
  43.  
  44.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  45.     include 'Files.a'
  46.     ENDIF
  47.  
  48.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  49.     include 'Types.a'
  50.     ENDIF
  51. ; typedef UInt32             AGRefNum
  52. ; typedef UInt32             AGCoachRefNum
  53. ; typedef UInt32             AGContextRefNum
  54. AGAppInfo                 RECORD    0
  55. eventId                     ds.l   1        ; offset: $0 (0)
  56. refCon                     ds.l   1        ; offset: $4 (4)
  57. contextObj                 ds.l   1        ; offset: $8 (8)        ; private system field
  58. sizeof                     EQU *            ; size:   $C (12)
  59.                         ENDR
  60.  
  61. ; typedef struct AGAppInfo     AGAppInfo, *AGAppInfoPtr, **AGAppInfoHdl
  62.  
  63. gestaltAppleGuidePresent        EQU        31
  64. gestaltAppleGuideIsDebug        EQU        30
  65. kAGDefault                        EQU        0
  66. kAGFrontDatabase                EQU        1
  67. kAGNoMixin                        EQU        (-1)
  68.  
  69. kAGViewFullHowdy                EQU        1                    ; Full-size Howdy
  70. kAGViewTopicAreas                EQU        2                    ; Full-size Topic Areas
  71. kAGViewIndex                    EQU        3                    ; Full-size Index Terms
  72. kAGViewLookFor                    EQU        4                    ; Full-size Look-For (Search)
  73. kAGViewSingleHowdy                EQU        5                    ; Single-list-size Howdy
  74. kAGViewSingleTopics                EQU        6                    ; Single-list-size Topics
  75.  
  76. kAGFileMain                        EQU        'poco'
  77. kAGFileMixin                    EQU        'mixn'
  78.  
  79. ; To test against AGGetAvailableDBTypes
  80. kAGDBTypeBitAny                    EQU        $00000001
  81. kAGDBTypeBitHelp                EQU        $00000002
  82. kAGDBTypeBitTutorial            EQU        $00000004
  83. kAGDBTypeBitShortcuts            EQU        $00000008
  84. kAGDBTypeBitAbout                EQU        $00000010
  85. kAGDBTypeBitOther                EQU        $00000080
  86.  
  87. ; typedef UInt16             AGStatus
  88. ; Returned by AGGetStatus
  89.  
  90. kAGIsNotRunning                    EQU        0
  91. kAGIsSleeping                    EQU        1
  92. kAGIsActive                        EQU        2
  93.  
  94. ; typedef UInt16             AGWindowKind
  95. ; Returned by AGGetFrontWindowKind
  96.  
  97. kAGNoWindow                        EQU        0
  98. kAGAccessWindow                    EQU        1
  99. kAGPresentationWindow            EQU        2
  100.  
  101. ; Error Codes
  102. ; Not an enum, because other OSErrs are valid.
  103. ; typedef SInt16             AGErr
  104. ; Apple Guide error codes
  105.  
  106. ; -------------------- Apple event reply codes
  107. kAGErrUnknownEvent                EQU        -2900
  108. kAGErrCantStartup                EQU        -2901
  109. kAGErrNoAccWin                    EQU        -2902
  110. kAGErrNoPreWin                    EQU        -2903
  111. kAGErrNoSequence                EQU        -2904
  112. kAGErrNotOopsSequence            EQU        -2905
  113. kAGErrReserved06                EQU        -2906
  114. kAGErrNoPanel                    EQU        -2907
  115. kAGErrContentNotFound            EQU        -2908
  116. kAGErrMissingString                EQU        -2909
  117. kAGErrInfoNotAvail                EQU        -2910
  118. kAGErrEventNotAvailable            EQU        -2911
  119. kAGErrCannotMakeCoach            EQU        -2912
  120. kAGErrSessionIDsNotMatch        EQU        -2913
  121. kAGErrMissingDatabaseSpec        EQU        -2914
  122. ; -------------------- Coach's Chalkboard reply codes
  123. kAGErrItemNotFound                EQU        -2925
  124. kAGErrBalloonResourceNotFound    EQU        -2926
  125. kAGErrChalkResourceNotFound        EQU        -2927
  126. kAGErrChdvResourceNotFound        EQU        -2928
  127. kAGErrAlreadyShowing            EQU        -2929
  128. kAGErrBalloonResourceSkip        EQU        -2930
  129. kAGErrItemNotVisible            EQU        -2931
  130. kAGErrReserved32                EQU        -2932
  131. kAGErrNotFrontProcess            EQU        -2933
  132. kAGErrMacroResourceNotFound        EQU        -2934
  133. ; -------------------- API reply codes
  134. kAGErrAppleGuideNotAvailable    EQU        -2951
  135. kAGErrCannotInitCoach            EQU        -2952
  136. kAGErrCannotInitContext            EQU        -2953
  137. kAGErrCannotOpenAliasFile        EQU        -2954
  138. kAGErrNoAliasResource            EQU        -2955
  139. kAGErrDatabaseNotAvailable        EQU        -2956
  140. kAGErrDatabaseNotOpen            EQU        -2957
  141. kAGErrMissingAppInfoHdl            EQU        -2958
  142. kAGErrMissingContextObject        EQU        -2959
  143. kAGErrInvalidRefNum                EQU        -2960
  144. kAGErrDatabaseOpen                EQU        -2961
  145. kAGErrInsufficientMemory        EQU        -2962
  146.  
  147. ; Events
  148. ; Not an enum because we want to make assignments.
  149. ; typedef UInt32             AGEvent
  150. ; Handy events for AGGeneral.
  151.  
  152. ; Panel actions (Require a presentation window).
  153. kAGEventDoCoach                    EQU        'doco'
  154. kAGEventDoHuh                    EQU        'dhuh'
  155. kAGEventGoNext                    EQU        'gonp'
  156. kAGEventGoPrev                    EQU        'gopp'
  157. kAGEventHidePanel                EQU        'pahi'
  158. kAGEventReturnBack                EQU        'gobk'
  159. kAGEventShowPanel                EQU        'pash'
  160. kAGEventTogglePanel                EQU        'patg'
  161.  
  162. ; Functions
  163. ; AGClose
  164. ; Close the database associated with the AGRefNum.
  165. ;
  166. ; pascal AGErr AGClose(AGRefNum *refNum)
  167. ;
  168.     IF ¬ GENERATINGCFM THEN
  169.         Macro
  170.         _AGClose
  171.             moveq    #17,d0
  172.             dc.w     $AA6E
  173.         EndM
  174.     ELSE
  175.         IMPORT_CFM_FUNCTION    AGClose
  176.     ENDIF
  177.  
  178. ; AGGeneral
  179. ; Cause various events to happen.
  180. ;
  181. ; pascal AGErr AGGeneral(AGRefNum refNum, AGEvent theEvent)
  182. ;
  183.     IF ¬ GENERATINGCFM THEN
  184.         Macro
  185.         _AGGeneral
  186.             moveq    #13,d0
  187.             dc.w     $AA6E
  188.         EndM
  189.     ELSE
  190.         IMPORT_CFM_FUNCTION    AGGeneral
  191.     ENDIF
  192.  
  193. ; AGGetAvailableDBTypes
  194. ; Return the database types available for this application.
  195. ;
  196. ; pascal UInt32 AGGetAvailableDBTypes(void)
  197. ;
  198.     IF ¬ GENERATINGCFM THEN
  199.         Macro
  200.         _AGGetAvailableDBTypes
  201.             moveq    #8,d0
  202.             dc.w     $AA6E
  203.         EndM
  204.     ELSE
  205.         IMPORT_CFM_FUNCTION    AGGetAvailableDBTypes
  206.     ENDIF
  207.  
  208. ; AGGetFrontWindowKind
  209. ; Return the kind of the front window.
  210. ;
  211. ; pascal AGWindowKind AGGetFrontWindowKind(AGRefNum refNum)
  212. ;
  213.     IF ¬ GENERATINGCFM THEN
  214.         Macro
  215.         _AGGetFrontWindowKind
  216.             moveq    #12,d0
  217.             dc.w     $AA6E
  218.         EndM
  219.     ELSE
  220.         IMPORT_CFM_FUNCTION    AGGetFrontWindowKind
  221.     ENDIF
  222.  
  223. ; AGGetFSSpec
  224. ; Return the FSSpec for the AGRefNum.
  225. ;
  226. ; pascal AGErr AGGetFSSpec(AGRefNum refNum, FSSpec *fileSpec)
  227. ;
  228.     IF ¬ GENERATINGCFM THEN
  229.         Macro
  230.         _AGGetFSSpec
  231.             moveq    #15,d0
  232.             dc.w     $AA6E
  233.         EndM
  234.     ELSE
  235.         IMPORT_CFM_FUNCTION    AGGetFSSpec
  236.     ENDIF
  237.  
  238. ; AGGetStatus
  239. ; Return the status of Apple Guide.
  240. ;
  241. ; pascal AGStatus AGGetStatus(void)
  242. ;
  243.     IF ¬ GENERATINGCFM THEN
  244.         Macro
  245.         _AGGetStatus
  246.             moveq    #9,d0
  247.             dc.w     $AA6E
  248.         EndM
  249.     ELSE
  250.         IMPORT_CFM_FUNCTION    AGGetStatus
  251.     ENDIF
  252.  
  253. ; AGInstallCoachHandler
  254. ; Install a Coach object location query handler.
  255. ;
  256. ; pascal AGErr AGInstallCoachHandler(CoachReplyUPP coachReplyProc, long refCon, AGCoachRefNum *resultRefNum)
  257. ;
  258.     IF ¬ GENERATINGCFM THEN
  259.         Macro
  260.         _AGInstallCoachHandler
  261.             moveq    #18,d0
  262.             dc.w     $AA6E
  263.         EndM
  264.     ELSE
  265.         IMPORT_CFM_FUNCTION    AGInstallCoachHandler
  266.     ENDIF
  267.  
  268. ; AGInstallContextHandler
  269. ; Install a context check query handler.
  270. ;
  271. ; pascal AGErr AGInstallContextHandler(ContextReplyUPP contextReplyProc, AEEventID eventID, long refCon, AGContextRefNum *resultRefNum)
  272. ;
  273.     IF ¬ GENERATINGCFM THEN
  274.         Macro
  275.         _AGInstallContextHandler
  276.             moveq    #19,d0
  277.             dc.w     $AA6E
  278.         EndM
  279.     ELSE
  280.         IMPORT_CFM_FUNCTION    AGInstallContextHandler
  281.     ENDIF
  282.  
  283. ; AGIsDatabaseOpen
  284. ; Return true if the database associated with the AGRefNum is open.
  285. ;
  286. ; pascal Boolean AGIsDatabaseOpen(AGRefNum refNum)
  287. ;
  288.     IF ¬ GENERATINGCFM THEN
  289.         Macro
  290.         _AGIsDatabaseOpen
  291.             moveq    #6,d0
  292.             dc.w     $AA6E
  293.         EndM
  294.     ELSE
  295.         IMPORT_CFM_FUNCTION    AGIsDatabaseOpen
  296.     ENDIF
  297.  
  298. ; AGOpen
  299. ; Open a guide database.
  300. ;
  301. ; pascal AGErr AGOpen(FSSpec *fileSpec, UInt32 flags, Handle mixinControl, AGRefNum *resultRefNum)
  302. ;
  303.     IF ¬ GENERATINGCFM THEN
  304.         Macro
  305.         _AGOpen
  306.             moveq    #1,d0
  307.             dc.w     $AA6E
  308.         EndM
  309.     ELSE
  310.         IMPORT_CFM_FUNCTION    AGOpen
  311.     ENDIF
  312.  
  313. ; AGOpenWithSearch
  314. ; Open a guide database and preset a search string.
  315. ;
  316. ; pascal AGErr AGOpenWithSearch(FSSpec *fileSpec, UInt32 flags, Handle mixinControl, ConstStr255Param searchString, AGRefNum *resultRefNum)
  317. ;
  318.     IF ¬ GENERATINGCFM THEN
  319.         Macro
  320.         _AGOpenWithSearch
  321.             moveq    #2,d0
  322.             dc.w     $AA6E
  323.         EndM
  324.     ELSE
  325.         IMPORT_CFM_FUNCTION    AGOpenWithSearch
  326.     ENDIF
  327.  
  328. ; AGOpenWithSequence
  329. ; Open a guide database and display a presentation window sequence.
  330. ;
  331. ; pascal AGErr AGOpenWithSequence(FSSpec *fileSpec, UInt32 flags, Handle mixinControl, short sequenceID, AGRefNum *resultRefNum)
  332. ;
  333.     IF ¬ GENERATINGCFM THEN
  334.         Macro
  335.         _AGOpenWithSequence
  336.             moveq    #4,d0
  337.             dc.w     $AA6E
  338.         EndM
  339.     ELSE
  340.         IMPORT_CFM_FUNCTION    AGOpenWithSequence
  341.     ENDIF
  342.  
  343. ; AGOpenWithView
  344. ; Open a guide database and override the default view.
  345. ;
  346. ; pascal AGErr AGOpenWithView(FSSpec *fileSpec, UInt32 flags, Handle mixinControl, short viewNum, AGRefNum *resultRefNum)
  347. ;
  348.     IF ¬ GENERATINGCFM THEN
  349.         Macro
  350.         _AGOpenWithView
  351.             moveq    #5,d0
  352.             dc.w     $AA6E
  353.         EndM
  354.     ELSE
  355.         IMPORT_CFM_FUNCTION    AGOpenWithView
  356.     ENDIF
  357.  
  358. ; AGQuit
  359. ; Make Apple Guide quit.
  360. ;
  361. ; pascal AGErr AGQuit(void)
  362. ;
  363.     IF ¬ GENERATINGCFM THEN
  364.         Macro
  365.         _AGQuit
  366.             moveq    #16,d0
  367.             dc.w     $AA6E
  368.         EndM
  369.     ELSE
  370.         IMPORT_CFM_FUNCTION    AGQuit
  371.     ENDIF
  372.  
  373. ; AGRemoveCoachHandler
  374. ; Remove the Coach object location query handler.
  375. ;
  376. ; pascal AGErr AGRemoveCoachHandler(AGCoachRefNum *resultRefNum)
  377. ;
  378.     IF ¬ GENERATINGCFM THEN
  379.         Macro
  380.         _AGRemoveCoachHandler
  381.             moveq    #20,d0
  382.             dc.w     $AA6E
  383.         EndM
  384.     ELSE
  385.         IMPORT_CFM_FUNCTION    AGRemoveCoachHandler
  386.     ENDIF
  387.  
  388. ; AGRemoveContextHandler
  389. ; Remove the context check query handler.
  390. ;
  391. ; pascal AGErr AGRemoveContextHandler(AGContextRefNum *resultRefNum)
  392. ;
  393.     IF ¬ GENERATINGCFM THEN
  394.         Macro
  395.         _AGRemoveContextHandler
  396.             moveq    #21,d0
  397.             dc.w     $AA6E
  398.         EndM
  399.     ELSE
  400.         IMPORT_CFM_FUNCTION    AGRemoveContextHandler
  401.     ENDIF
  402.  
  403. ; AGStart
  404. ; Start up Apple Guide in the background.
  405. ;
  406. ; pascal AGErr AGStart(void)
  407. ;
  408.     IF ¬ GENERATINGCFM THEN
  409.         Macro
  410.         _AGStart
  411.             moveq    #10,d0
  412.             dc.w     $AA6E
  413.         EndM
  414.     ELSE
  415.         IMPORT_CFM_FUNCTION    AGStart
  416.     ENDIF
  417.  
  418.     ENDIF ; __APPLEGUIDE__
  419.